<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="core" uri="http://www.taikang.com/jsp/tags/core" %>
<!DOCTYPE html>
<html> 
	<head>
		<title>保存角色</title>
		<jsp:include page="/WEB-INF/pages/admin/base/admin_css_inc.jsp" />
		<link rel="stylesheet"  href="${ctxPath}/static/base/lib/tc_checkbox/tc_checkbox.css?v=${sysVersion}" />
	</head>
	<body class="iframe-body">
		<div class="oper mb5">
			<a id="saveBtn" class="ui_button fl mr5" href="javascript:void(0);">保存</a>
			<a id="backBtn" class="ui_button fl mr5" href="javascript:void(0);">返回</a>
		</div>
		<%-- 基本信息 --%>
		<form id="roleForm" action="${ctxPath}/admin/auth/role/saveRole.htm" method="post">
		<core:token/>
		<input id="itemId" name="item.id" value="${item.id}" type="hidden" />
		<table class="form-table">
			<caption>
				基本信息
			</caption>
			<tr>
				<td class="form-title" width="12%">
					<em>*</em>角色名称：
				</td>
				<td class="form-content" width="40%">
					<input id="roleName" name="item.name" value="${item.name}" class="tc-input-text w" type="text" autocomplete="off" />
				</td>
				<td class="form-content" width="48%">
					<span id="roleNameTip"></span>
				</td>
			</tr>
			<c:if test="${haveRight == true }">
			<tr>
				<td class="form-title" width="12%">
					角色代码：
				</td>
				<td class="form-content" width="40%">
					<input id="roleCode" name="item.code" value="${item.code}" class="tc-input-text w" type="text" autocomplete="off" />
				</td>
				<td class="form-content" width="48%">
					<span id="roleCodeTip"></span>
				</td>
			</tr>
			</c:if>
			<tr>
				<td class="form-title">
					角色描述：
				</td>
				<td class="form-content">
					<textarea id="roleRemark" name="item.remark" class="tc-textarea w h80">${item.remark}</textarea>
				</td>
				<td class="form-content">
				</td>
			</tr>
			
		</table>
		<div class="caption-div mt3">
			权限设置
			<input id="rightCheckedList" name="item.rightIds" type="hidden" />
		</div>
		<div class="caption-div-border">
			<ul class="right-big-class w100 fl">
				<c:forEach items="${rights}" var="curRight">
					<li class="rbc-item mb5">
						<a class="rbc-item-a" data="${curRight.id}" href="javascript:void(0);">
							<span rightId="${curRight.id}" class="button chk checkbox_true_disable"></span>
							<span class="rbc-item-span">${curRight.name}</span>
						</a>
					</li>
				</c:forEach>
			</ul>
			<div class="right-content fl" id="rightContent">
			</div>
			<div class="cb"></div>
		</div>
		</form>
		<jsp:include page="/WEB-INF/pages/admin/base/admin_js_inc.jsp"/>
		<script type="text/javascript" src="${ctxPath}/static/admin/auth/role_edit.js?v=${sysVersion}"></script>
	</body>
</html>